// 商品列表大盒子组件
<template>
  <div class='goods'>
      <goods-list-item v-for="item in goods" :key="item.projectId" :goodsItem="item"></goods-list-item>
  </div>
</template>

<script>
import GoodsListItem from './GoodsListItem.vue'
export default {
  components: { GoodsListItem },
  name: "GoodList",
  props: {
      goods: {
          type: Array,
          default() {
              return []
          }
      }
  }
}
</script>

<style scoped>
    .goods {
    display: flex;
    /* 给子元素社低昂宽度，在设置flex-wrap: wrap实现根据宽度自动决定一行显示几个 */
    flex-wrap: wrap;
    /* 实现子元素均等分 */
    justify-content: space-around;

    padding: 2px;
  }
</style>
